/*
 * 
 */
package com.ap.core.domain;

import javax.persistence.AttributeOverride;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

import org.hibernate.annotations.Type;
import org.hibernate.annotations.TypeDef;
import org.joda.time.LocalDate;

/**
 * User: Rohit.Dixit
 */
@Entity
@Table(name = "T_EXCEPTION_DETAILS")
@AttributeOverride(name = "id", column = @Column(name = "EXCEPTION_ID"))
@TypeDef(name = "id", typeClass = Long.class)
public class ExceptionDetails extends Identifiable<Long> {

    private static final long serialVersionUID = -5502969252123694872L;
    
    @Column(name = "RECONCILIATION_CYCLE_ID")
    private String  reconciliationCycleId;

    @Column(name = "RECONCILIATION_DATE")
    @Type(type = "org.jadira.usertype.dateandtime.joda.PersistentLocalDate")
    private LocalDate reconciliationDate;
    
    @Column(name = "MESSAGE_TYPE_CODE")
    private String messageTypeCode;
    
    @Column(name = "BUSINESS_ERROR_CODE")
    private String businessErrorCode;

    @Column(name = "msg_id")
    private Long apMessageId;
    
    private ExceptionDetails() {
    }

    public ExceptionDetails(String reconciliationCycleId,
			LocalDate reconciliationDate, String messageTypeCode,
			String businessErrorCode, Long apMessageId) {
		super();
		this.reconciliationCycleId = reconciliationCycleId;
		this.reconciliationDate = reconciliationDate;
		this.messageTypeCode = messageTypeCode;
		this.businessErrorCode = businessErrorCode;
		this.apMessageId = apMessageId;
	}

	/**
	 * @return the reconciliationCycleId
	 */
	public String getReconciliationCycleId() {
		return reconciliationCycleId;
	}

	/**
	 * @return the reconciliationDate
	 */
	public LocalDate getReconciliationDate() {
		return reconciliationDate;
	}

	/**
	 * @return the messageTypeCode
	 */
	public String getMessageTypeCode() {
		return messageTypeCode;
	}

	/**
	 * @return the businessErrorCode
	 */
	public String getBusinessErrorCode() {
		return businessErrorCode;
	}

	/**
	 * @return the apMessageId
	 */
	public Long getApMessageId() {
		return apMessageId;
	}

	
	
}
